package com.hpjpw.ido.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hpjpw.ido.mapper.CommunicationMapper;
import com.hpjpw.ido.domain.Communication;
import com.hpjpw.ido.service.ICommunicationService;

/**
 * 聊天内容Service业务层处理
 * 
 * @author hpj
 * @date 2021-01-02
 */
@Service
public class CommunicationServiceImpl implements ICommunicationService
{
    @Autowired
    private CommunicationMapper communicationMapper;

    /**
     * 查询聊天内容
     * 
     * @param id 聊天内容ID
     * @return 聊天内容
     */
    @Override
    public Communication selectCommunicationById(String id)
    {
        return communicationMapper.selectCommunicationById(id);
    }

    /**
     * 通过守护关系ID查询聊天内容列表
     *
     * @param guardId 聊天内容
     * @return 聊天内容集合
     */
    @Override
    public List<Communication> selectCommunicationByGuardId(Long guardId) {
        return communicationMapper.selectCommunicationByGuardId(guardId);
    }

    /**
     * 查询聊天内容列表
     * 
     * @param communication 聊天内容
     * @return 聊天内容
     */
    @Override
    public List<Communication> selectCommunicationList(Communication communication)
    {
        return communicationMapper.selectCommunicationList(communication);
    }

    /**
     * 新增聊天内容
     * 
     * @param communication 聊天内容
     * @return 结果
     */
    @Override
    public int insertCommunication(Communication communication)
    {
        return communicationMapper.insertCommunication(communication);
    }

    /**
     * 修改聊天内容
     * 
     * @param communication 聊天内容
     * @return 结果
     */
    @Override
    public int updateCommunication(Communication communication)
    {
        return communicationMapper.updateCommunication(communication);
    }

    /**
     * 批量删除聊天内容
     * 
     * @param ids 需要删除的聊天内容ID
     * @return 结果
     */
    @Override
    public int deleteCommunicationByIds(String[] ids)
    {
        return communicationMapper.deleteCommunicationByIds(ids);
    }

    /**
     * 删除聊天内容信息
     * 
     * @param id 聊天内容ID
     * @return 结果
     */
    @Override
    public int deleteCommunicationById(String id)
    {
        return communicationMapper.deleteCommunicationById(id);
    }
}
